export default {
  namespaced: true,
  state: {
    loading: false,
    count: 0, // 计数器
    isResize: false
  },
  getters: {},
  mutations: {
    hideLoading(state) {
      //使用Utils.Tools.store.hideLoading();
      state.loading = false;
    },
    showLoading(state) {
      //使用Utils.Tools.store.showLoading();
      state.loading = true;
    },
    addCount(state, payload) {
      state.count++;
    },
    reduceCount(state, payload) {
      const count = state.count - 1;
      state.count = count >= 0 ? count : 0;
    },
    clearCount(state, payload) {
      state.count = 0;
    },
    windowResize(state) {
      state.isResize = !state.isResize;
    }
  },
  actions: {}
};
